extension ListExt<E> on List<E> {
  List<E> filter(bool Function(E e) fun) {
    List<E> data = [];
    forEach((element) {
      if (fun(element)) {
        data.add(element);
      }
    });
    return data;
  }

  E? find(bool Function(E e) fun) {
   for (var el in this) {
     if(fun(el)) {
       return el;
     }
   }
   return null;
  }

  List<E> concat(List<E> list) {
    for (var element in list) {
      add(element);
    }
    return this;
  }
}
